#ifndef UCODE_H_INC
#define UCODE_H_INC

#ifdef UCODE_EXPORTS
#define UCODE_API __declspec(dllexport)
#else
#define UCODE_API __declspec(dllimport)
#endif

#include <windows.h>

#ifdef __cplusplus 
extern "C" {
#endif 

UCODE_API DWORD __stdcall UcodeGetDllVer(void);
UCODE_API int __stdcall UcodeGetName(char nameBuf[], int empNo);
UCODE_API int __stdcall UcodeGetEnName(char nameBuf[], int empNo);
UCODE_API int __stdcall UcodeGetRank(int empNo, long sn);
UCODE_API int __stdcall UcodeGetOperKey(int superKey, int empNo, long sn);

UCODE_API void __stdcall UcodeOpen(long devKey, long sn);
UCODE_API void __stdcall UcodeClose(void);
UCODE_API long __stdcall UcodeGetKey(long params[], int n);
UCODE_API long __stdcall UcodeGetGtKey(long type, long user, long maxcnt, long cnt);
UCODE_API long __stdcall UcodeGetAuthOperKey(long checkNumber, long originalOperKey);
UCODE_API int  __stdcall DecodeEmpNo(long checkNumber, long operKey);
UCODE_API BOOL __stdcall UcodeVerifyKey(long params[], int n, long key);
UCODE_API BOOL __stdcall UcodeVerifyGtKey(long type, long user, long maxcnt, long cnt, long key);

UCODE_API DWORD __stdcall MucodeOpen(long devKey, long sn);
UCODE_API void __stdcall MucodeClose(DWORD hUcode);
UCODE_API long __stdcall MucodeGetKey(DWORD hUcode, long params[], int n);
UCODE_API long __stdcall MucodeGetGtKey(DWORD hUcode, long type, long user, long maxcnt, long cnt);
UCODE_API long __stdcall MucodeGetAuthOperKey(DWORD hUcode, long checkNumber, long originalOperKey);
UCODE_API int  __stdcall MdecodeEmpNo(DWORD hUcode, long checkNumber, long operKey);
UCODE_API BOOL __stdcall MucodeVerifyKey(DWORD hUcode, long params[], int n, long key);
UCODE_API BOOL __stdcall MucodeVerifyGtKey(DWORD hUcode, long type, long user, long maxcnt, long cnt, long key);

#ifdef __cplusplus 
}
#endif 

#endif // UCODE_H_INC
